// survive-game types
//

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <time.h>
#include <readline/readline.h>
#include <readline/history.h>

#define MAX_LOCATIONS   11
#define MAX_NAMES       20
#define MAX_SURVIVORS    4
#define MAX_STATS      100

typedef struct
{
  char *description1;
  char *description2;
  int  ZombieDensity;    // 0-100
  int  MaterialDensity;  // 0-100
  int  FoodDensity;      // 0-100
  int  Fortification;    // 0-100
} locations_t;

typedef struct 
{
   int  name;
   int  health;    // 0-100 (100 == full health)
   int  hunger;    // 0-100 (100 == starving)
   int  rested;    // 0-100 (100 == fully rested)
   int  scavange;
   int  awareness;
   int  building;
   int  fighting;
} survivor_t;

#define getSRand()      ( (float) rand() / (float) RAND_MAX )
#define getRand( x )    (int)((x) * getSRand() )

#define M_Adjust( x )   ( x + getRand( (int)(x/10) ) )

// Times
#define DAWN   0
#define DUSK   1
#define NIGHT  2

#define M_Time( x )   ( x % 3 )

// Public Functions

void SurvivorsInit( void );
int  SurvivorsAlive( void );
void SurvivorsPrintStats( void );

void LocationInit( void );
void LocationLook( void );

void HelpActivity( void );

int ExecuteCommand( char * );

